-
Notifications
You must be signed in to change notification settings - Fork 10
Add nearing quota warning #896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f09d200
to
00c46dc
Compare
@girishpanchal30 looks good 👍🏻 Can you please also fix the merge conflict on this? Thank you! |
@abaicus Resolved |
@abaicus I applied the following changes to index 4ad23a7..3375b31 100644
--- a/tests/test-preloading.php
+++ b/tests/test-preloading.php
@@ -52,7 +52,12 @@ class Test_Preloading extends WP_UnitTestCase {
set_theme_mod( 'header_image', $header_image_data->url );
set_theme_mod( 'header_image_data', $header_image_data );
- $header = get_header_image_tag();
+ $header = get_header_image_tag(
+ array(
+ 'fetchpriority' => 'high',
+ )
+ );
+
$this->assertStringContainsString( 'fetchpriority="high"', $header );
// Test it doesn't add the attribute when called again.
@@ -62,11 +67,18 @@ class Test_Preloading extends WP_UnitTestCase {
public function test_preloading_logo() {
set_theme_mod( 'custom_logo', self::$sample_attachement );
+ add_filter( 'get_custom_logo_image_attributes', array( $this, 'custom_logo_image_attributes' ), 999 );
$logo = get_custom_logo();
+ remove_filter( 'get_custom_logo_image_attributes', array( $this, 'custom_logo_image_attributes' ), 999 );
$this->assertStringContainsString( 'fetchpriority="high"', $logo );
// Test it doesn't add the attribute when called again.
$logo = get_custom_logo();
$this->assertStringNotContainsString( 'fetchpriority="high"', $logo );
}
+
+ public function custom_logo_image_attributes( $attributes ) {
+ $attributes['fetchpriority'] = 'high';
+ return $attributes;
+ }
}
Should I include these changes in this PR? |
@girishpanchal30 please rebase to have the tests fixed |
9f628a2
to
6a790ed
Compare
@selul Done! |
🎉 This PR is included in version 4.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Show a warning for exceeding quota soon if the user reaches over 50% of their monthly visit limit within two weeks.
Closes https://github.com/Codeinwp/optimole-service/issues/1318
How to test the changes in this Pull Request:
days_since_registration
value.Other information: